package com.lzt.yijian.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lzt.yijian.mvp.view.fragment.CollegeFragment;
import com.lzt.yijian.mvp.view.fragment.HomeFragment;
import com.lzt.yijian.mvp.view.fragment.MyFragment;
import com.lzt.yijian.mvp.view.fragment.RunFragment;

public class MyFragmentPagerAdapter extends FragmentPagerAdapter {

    public MyFragmentPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0:
                return new HomeFragment();
            case 1:
                return new CollegeFragment();
            case 2:
                return new RunFragment();
            case 3:
                return new MyFragment();
        }
        return null;
    }

    @Override
    public int getCount() {
        return 4;
    }
}
